@extends('layouts.home')
@section('title','金汇智谷——科技成果')
@section('addstyle')
	<link rel="stylesheet" type="text/css" href="{{asset('resources/views/home/css/teachering.css')}}">
@endsection
@section('content')

	<div class="fruitclass">
		<table>
			<tr>
				<td width="80">技术领域：</td>
				<td>
					<ul id="domainList">
						<script type="text/javascript">
						var domainArr=['不限','信息技术','新材料','资源环境','纺织服装','食品营养','装备制造','交通运输','生物医药','现代农业','节能建筑','新能源','科技服务','IT互联网','其他'];
						<?php $domain=isset($_GET['domain'])?$_GET['domain']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<domainArr.length;i++){
							if(domainArr[i]=='{{$domain}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+domainArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+domainArr[i]+'</a></li>';
							}
						}
						$('#domainList').html(htmlstr);
						</script>
						<!-- <li><a href="javascript:;" class="active">不限</a></li>
						<li><a href="javascript:;">信息技术</a></li>
						<li><a href="javascript:;">新材料</a></li>
						<li><a href="javascript:;">资源环境</a></li>
						<li><a href="javascript:;">纺织服装</a></li>
						<li><a href="javascript:;">食品营养</a></li>
						<li><a href="javascript:;">装备制造</a></li>
						<li><a href="javascript:;">交通运输</a></li>
						<li><a href="javascript:;">生物医药</a></li>
						<li><a href="javascript:;">现代农业</a></li>
						<li><a href="javascript:;">节能建筑</a></li>
						<li><a href="javascript:;">新能源</a></li>
						<li><a href="javascript:;">科技服务</a></li>
						<li><a href="javascript:;">IT互联网</a></li>
						<li><a href="javascript:;">其她</a></li> -->
					</ul>
				</td>
			</tr>
			<tr>
				<td width="80">交易价格：</td>
				<td>
					<ul id="rateList">
						<script type="text/javascript">
						var rateArr=['不限','面议','1~5万','5~10万','10~20万','20~50万','50万以上'];
						<?php $rate=isset($_GET['rate'])?$_GET['rate']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<rateArr.length;i++){
							if(rateArr[i]=='{{$rate}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+rateArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+rateArr[i]+'</a></li>';
							}
						}
						$('#rateList').html(htmlstr);
						</script>
						<!-- <li><a href="" class="active">不限</a></li>
						<li><a href="">面议</a></li>
						<li><a href="">1~5万</a></li>
						<li><a href="">5~10万</a></li>
						<li><a href="">10~20万</a></li>
						<li><a href="">20~50万</a></li>
						<li><a href="">50万以上</a></li> -->
					</ul>
				</td>
			</tr>
		</table>
	</div>

	<script type="text/javascript">
	$(function(){
		$('#domainList li a').click(function(){
			$('#domainList li a').removeClass('active');
			$(this).addClass('active');
			location.href="{{url('fruit')}}?domain="+$(this).text()+"&rate={{$rate}}";
		})
		$('#rateList li a').click(function(){
			$('#rateList li a').removeClass('active');
			$(this).addClass('active');
			location.href="{{url('fruit')}}?domain={{$domain}}&rate="+$(this).text();
		})
	})
	</script>
	<div class="w100con bggrey">
		<div class="container help">
			<div class="row">
				<div class="col-md-12">
					<div class="help-con clearfix">
							<div class="helpleft bgwhite">
                            <div class="creadf bggrey">
                              <a href="{{url('admin/fruit')}}"><button type="button" class="btn btn-danger btn-lg btn-block">我要发布成果</button></a>
                            </div>
							<dl class="helpdl">
									<dt class="f20 fgrey">点击排行</dt>
                                <?php $i=1; ?>
                                @foreach($fruview as $v)
                                <dd><span class="block" style="background:#3BC9CB;"><?php echo $i; ?></span><a href="{{url('fruit/'.$v->fru_id)}}" title="{{$v->fru_name}}">{{$v->fru_name}}</a>
                                </dd>
                                <?php $i++; ?>
                                @endforeach
                            </dl>
							<dl class="helpdl">
									<dt class="f20 fgrey">最新文章</dt>
                                    <?php $i=1; ?>
                                    @foreach($frutime as $t)
                                    <dd><span class="block" style="background:#3BC9CB;"><?php echo $i; ?></span><a href="{{url('fruit/'.$t->fru_id)}}" title="{{$t->fru_name}}">{{$t->fru_name}}</a></dd>
                                    <?php $i++; ?>
                                    @endforeach
                            </dl>
                </div>	
					<div class="helpright bgwhite">
			<h1 class="title">科技成果&nbsp;&nbsp;&nbsp;<small>信息列表</small></h1>
			
			<ul id="publicContent" style="min-height:500px;">
				@foreach($frudata as $f)
				<li>					
					<span class="time">{{date('Y-m-d',$f->fru_time)}}</span>
					<p>
						<a href="{{url('fruit/'.$f->fru_id)}}" title="{{$f->fru_name}}">{{$f->fru_name}}</a>
						专利状态：
						@if($f->fru_num=='无')
							<i class="btn1" style="background:#999;">未申请</i>
						@else
							<i class="btn1">已申请</i>
						@endif
						评估状态：
						@if($f->fru_ass=='待评估')
							<i class="btn2" style="background:#999;">待评估</i>
						@else
							<i class="btn2">已评估</i>
						@endif
						
					</p>
					<p>
						<span>技术领域：{{$f->fru_class}}</span>
						<span>交易价格：{{$f->fru_rate}}</span>
					</p>
				</li>
				@endforeach
			</ul>

			<div class="page">
				{{$frudata->links()}}
			</div>
          </div>
				</div>
				</div>
			</div>
		</div>
	</div>	
@endsection
